import {CanDeactivate} from '@angular/router';
import {ProductComponent} from '../product/product.component';

export class UnsaveGuard implements CanDeactivate<ProductComponent>{
  canDeactivate(product: ProductComponent) {
    return window.confirm("未保存数据，是否确认离开！");
  }

}
